<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="../../assets/libs/swiper/swiper-bundle.min.css">
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    .swiper {
      width: 50vw;
    }

    .swiper-slide {
      height: 50vh;
      opacity: 0.5;
    }
  </style>
</head>

<body>
  <div class="swiper">
    <div class="swiper-wrapper">
      <div class="swiper-slide" style="background-color: red"></div>
      <div class="swiper-slide" style="background-color: orange"></div>
      <div class="swiper-slide" style="background-color: yellow"></div>
      <div class="swiper-slide" style="background-color: green"></div>
      <div class="swiper-slide" style="background-color: cyan"></div>
      <div class="swiper-slide" style="background-color: blue"></div>
      <div class="swiper-slide" style="background-color: purple"></div>
    </div>
  </div>

  <script src="../../assets/libs/swiper/swiper-bundle.min.js"></script>
  <script>
    const swiper = new Swiper('.swiper', {})
  </script>
</body>

</html>